<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    <link rel="stylesheet" href="{{ url_for('static',filename='css/jimei.css') }}">

</head>
<body>
<div class="wrapper">
    <div class="row">
        <div class="col-md-12">
            <img src="{{ url_for('static',filename='img/1.jpg') }}" style="width:100%"/>
            <div id='logo'>
                <div class="col-md-2 center-block  logo"><img class="img-circle"
                                                              src="{{ url_for('static',filename='img/3.jpg') }}"
                                                              style="height: 150px;width: 150px;"></div>
                <div class="col-md-4 center-block"><img src="{{ url_for('static',filename='img/2.png') }}"></div>

            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-2  text-center bor" style="background-color: brown;color: white;">用户中心</div>
        <div class="col-md-5  text-center bor" style="background-color: brown;color: white;">最新消息</div>
        <div class="col-md-5  text-center" style="background-color: brown;color: white;">关注</div>
        <div class="col-md-2">
            {% if session.get('name') == None %}
                <div class="center-block text-center user">
                    <div>
                        <img src="{{ url_for('static',filename="img/1.jpg") }}" class="img-circle"
                             style="width:140px;height:140px">
                    </div>
                    <div>
                        <a href="{{ url_for("login") }}" class="btn btn-primary">登录</a>
                    </div>
                </div>
            {% endif %}
            {% if session.get('name') != None %}
                <div class="center-block text-center user">
                    <div>
                        <img src="{{ url_for('static',filename='img/1.jpg') }}" class="img-circle"
                             style="width:140px;height:140px">
                    </div>
                    <div>
                        <h1 class="btn btn-primary">{{ session['name'] }}</h1>
                    </div>
                    <div>
                        {#                        TODO：设置按钮 #}
                        <a href="{{ url_for("reset_password")}}" class="btn btn-primary">设置</a>
                    </div>
                    <div>
                        {#                        TODO:退出按钮 #}
                        <a href="{{ url_for('logout') }}" class="btn btn-primary">退出</a>
                    </div>
                </div>
            {% endif %}
        </div>
        {# start   这一段是新闻    #}
            <div class="col-md-5">
                <ul>
                    {% for info in infos %}
                        <li><a href="{{ info[0] }}">{{ info[1] }}</a></li><p>发布时间：{{ (info[2]) }}</p>
                    {% endfor %}
                </ul>
            </div>
        {# end   这一段是新闻    #}
        {% if session.get('name') != None %}
            <div class="col-md-5">
                <a href="{{ url_for('add_follower') }}" class="btn btn-primary">添加关注</a>
                <ul>
                    {% for follow in follows %}
                    <li>{{ follow }} <img src="{{ url_for('static',filename="img/delet.png") }}" onclick="deleteLi(this)"></li>
                    {% endfor %}
                </ul>
            </div>
        {% endif %}
    </div>
</div>
<script type="text/javascript" src="{{ url_for('static',filename='js/main.js') }}"></script>
</body>

</html>